    <%
        if(!pagerInfo){
            return;
        }
        var totalpages = pagerInfo['total'];
        var current = pagerInfo['current'];
        var mostBefore = 0;
        var mostAfter = 0;
        var begin, end;
        if(totalpages<=5){
            begin = 1;
            end = totalpages + 1;
        }
        else if(current - 2 >= 1) {

            begin = Math.min(current - 2, totalpages-4);
            end = Math.min(totalpages + 1, current+2+1);

            mostBefore = 1;
            mostAfter = totalpages;
        }
        else{
            begin = 1;
            end = 5+1;
            mostAfter = totalpages;
        }
    %>
    <% 
    var paramSymbol = urlparam;
    %>
<div class="row">
    <br />
    <div class="col-sm-12">
        <div class="dataTables_info" id="pager-info"> <%= current %>/<%= totalpages %> 总共<%= pagerInfo['datacount'] %>条数据 </div>
 
        <div class="dataTables_paginate paging_bootstrap pagination">
            <ul>
                <% if(current <= 1) { %>
                    <li class="prev disabled"><a href="#">← Prev</a></li>
                <% } else { %>
                    <li class="prev"><a href="<%=paramSymbol%>page=<%= current-1 %>">← Prev</a></li>
                <% } %>
                
                <% if(mostBefore < begin && mostBefore > 0) { %>
                    <li><a href="<%=paramSymbol%>page=<%= mostBefore %>"><%= mostBefore %></a></li>
                    <li class="puretext"><span>...</span></li>
                <% } %>

                <% for(var i = begin; i < end; i++) { %>
                     <% if(i == current) { %>
                        <li class="active"> <a href="#"><%= i %> </a></li>
                     <% } else {%>
                        <li> <a href="<%=paramSymbol%>page=<%= i %>"><%= i %></a> </li>
                     <% } %>
                <% } %>
                <% if(mostAfter >= end) { %>
                    <li class="puretext"><span>...</span></li>
                    <li><a href="<%=paramSymbol%>page=<%= mostAfter %>"><%= mostAfter %></a></li>
                <% } %>
                <% if(totalpages == current) { %>
                    <li class="next disabled"><a href="#">Next →</a></li>
                <% } else {%>
                    <li class="next"><a href="<%=paramSymbol%>page=<%= current+1 %>">Next →</a></li>
                <% } %>
            </ul>
        </div>
    </div>
</div>
